import myFlightOrder from "routes/normal/my-flight-order"; // 我的机票
import myHotelOrder from "routes/normal/my-hotel-order"; // 我的酒店

import RequestComp from "containers/request/request";
import NewRequestComp from "containers/request/new-edit-request";
import JDRequestEditComp from "containers/request/jd-request-edit";
import RequestEditComp from "containers/request/new-edit-request";
import RequestDetailComp from "containers/request/base-request-detail";
import NewBorrowComp from "containers/loan-billing/new-borrow";
import LoanDetailComp from "containers/loan-billing/loan-detail";
import GiftRequestDatailComp from 'containers/request/gift-request-detail'

export default {
  key: "my-travel",
  icon: "car",
  company: true,
  admin: false,
  // 设置了menuName就不需要设置语言包了
  menuName: "我的出行",
  subMenu: [
    myFlightOrder,
    myHotelOrder,
    {
      key: "travel-and-booking",
      url: "/main/my-travel/travel-and-booking",
      components: RequestComp,
      icon: "file-unknown",
      company: true,
      fpItem: ["ca.web.disabled"],
      fpValue: [[false, undefined]],
      menuItem: "出行及预订",
      children: {
        //新建申请单
        newRequest: {
          key: "new-travel-and-booking",
          url: "/main/my-travel/travel-and-booking/new-travel-and-booking/:formOID/:applicantOID/:jobId/:ifProxy",
          components: NewRequestComp,
          parent: "travel-and-booking",
        },
        //京东申请单编辑
        jdRequestEdit: {
          key: "jd-travel-and-booking-edit",
          url: "/main/my-travel/travel-and-booking/jd-travel-and-booking-edit/:formOID/:applicationOID",
          components: JDRequestEditComp,
          parent: "travel-and-booking",
        },
        //编辑申请单
        requestEdit: {
          key: "travel-and-booking-edit",
          url: "/main/my-travel/travel-and-booking/travel-and-booking-edit/:formOID/:applicationOID",
          components: RequestEditComp,
          parent: "travel-and-booking",
        },
        //申请单详情
        requestDetail: {
          key: "travel-and-booking-detail",
          url: "/main/my-travel/travel-and-booking/travel-and-booking-detail/:formOID/:applicationOID/:pageFrom",
          components: RequestDetailComp,
          parent: "travel-and-booking",
        },
        // 礼品申请单详情
        giftRequestDatail: {
          key: 'travel-and-booking-giftDetail',
          url: '/main/my-travel/travel-and-booking/travel-and-booking-giftDetail/:formOID/:applicationOID/:id',
          components: GiftRequestDatailComp,
          parent: 'travel-and-booking'
        },
        //新建借款单
        //单行，多行新建
        newBorrow: {
          key: "travel-and-booking-new-borrow",
          url: "/main/my-travel/travel-and-booking/travel-and-booking-new-borrow/:formOID/:applicationOID/:jobId",
          components: NewBorrowComp,
          parent: "my-borrow",
        },
        //借款单详情
        //多行编辑，单行&多行的非编辑
        loanDetail: {
          key: "travel-and-booking-loan-detail",
          url: "/main/my-travel/travel-and-booking/travel-and-booking-loan-detail/:formOID/:loanBillOID/:pageFrom/:applicationOID",
          components: LoanDetailComp,
          parent: "my-borrow",
        },
        //编辑借款单
        //单行编辑
        editBorrow: {
          key: "travel-and-booking-edit-borrow",
          url: "/main/my-travel/travel-and-booking/travel-and-booking-edit-borrow/:formOID/:loanBillOID/:applicationOID",
          components: NewBorrowComp,
          parent: "my-borrow",
        },
      },
    },
  ],
};
